﻿package com.housediyadmin
{
	import com.housediyadmin.command.brandCommand.AddBrandCommand;
	import com.housediyadmin.command.brandCommand.DeleteBrandByIDCommand;
	import com.housediyadmin.command.brandCommand.EditBrandCommand;
	import com.housediyadmin.command.brandCommand.GetBrandCommand;
	import com.housediyadmin.command.brandCommand.UpdateBrandCommand;
	import com.housediyadmin.command.buildingCommand.AddBuildingCommand;
	import com.housediyadmin.command.buildingCommand.AddBuildingLevelCommand;
	import com.housediyadmin.command.buildingCommand.DeleteBuildingCommand;
	import com.housediyadmin.command.buildingCommand.EditBuildingCommand;
	import com.housediyadmin.command.buildingCommand.GetBuildingCommand;
	import com.housediyadmin.command.buildingCommand.GetBuildingIdsCommand;
	import com.housediyadmin.command.buildingCommand.UpdateBuildingCommand;
	import com.housediyadmin.command.buildingCommand.UpdateBuildingIdsCommand;
	import com.housediyadmin.command.colorCommand.AddColorsCommand;
	import com.housediyadmin.command.colorCommand.UpdateColorCommand;
	import com.housediyadmin.command.fittingCommand.AddFittingCommand;
	import com.housediyadmin.command.fittingCommand.DeleteFittingByIDCmd;
	import com.housediyadmin.command.fittingCommand.EditFittingCommand;
	import com.housediyadmin.command.fittingCommand.GetAllFittingsCommand;
	import com.housediyadmin.command.fittingCommand.GetFittingByGoodsIDCmd;
	import com.housediyadmin.command.fittingCommand.UpdateFittingCommand;
	import com.housediyadmin.command.fittingCommand.UpdateFittingGoodsCmd;
	import com.housediyadmin.command.goodsCommand.AddGoodsCommand;
	import com.housediyadmin.command.goodsCommand.DeleteGoodsByIDsCmd;
	import com.housediyadmin.command.goodsCommand.EditGoodsCommand;
	import com.housediyadmin.command.goodsCommand.GetAllGoodsCommand;
	import com.housediyadmin.command.goodsCommand.GetGoodsByBrandIdCmd;
	import com.housediyadmin.command.goodsCommand.GetGoodsByDictFlagCmd;
	import com.housediyadmin.command.goodsCommand.GetGoodsByFittingIDCmd;
	import com.housediyadmin.command.goodsCommand.GetGoodsByNewsIDCmd;
	import com.housediyadmin.command.goodsCommand.GetGoodsBySalesIDCmd;
	import com.housediyadmin.command.goodsCommand.GetGoodsCommand;
	import com.housediyadmin.command.goodsCommand.UpdateGoodsBrandCmd;
	import com.housediyadmin.command.goodsCommand.UpdateGoodsCommand;
	import com.housediyadmin.command.goodsCommand.UpdateGoodsFittingCmd;
	import com.housediyadmin.command.goodsCommand.UpdateGoodsNewsCmd;
	import com.housediyadmin.command.goodsCommand.UpdateGoodsSalesCmd;
	import com.housediyadmin.command.goodsCommand.UpdateRelateGoodsCmd;
	import com.housediyadmin.command.houseCommand.AddHouseCommand;
	import com.housediyadmin.command.houseCommand.DeleteHouseCommand;
	import com.housediyadmin.command.houseCommand.EditHouseCommand;
	import com.housediyadmin.command.houseCommand.GetHouseIdsCmd;
	import com.housediyadmin.command.houseCommand.GetHouseListCommand;
	import com.housediyadmin.command.houseCommand.UpdateHouseIdsCmd;
	import com.housediyadmin.command.houseCommand.UpdateHouseModelCmd;
	import com.housediyadmin.command.newsCommand.AddNewsCommand;
	import com.housediyadmin.command.newsCommand.DeleteNewsCommand;
	import com.housediyadmin.command.newsCommand.EditNewsCommand;
	import com.housediyadmin.command.newsCommand.GetNewsCommand;
	import com.housediyadmin.command.newsCommand.UpdateNewsCommand;
	import com.housediyadmin.command.picCommand.AddPicsCommand;
	import com.housediyadmin.command.picCommand.UpdatePicCommand;
	import com.housediyadmin.command.roomCommand.AddRoomCommand;
	import com.housediyadmin.command.roomCommand.DeleteRoomCommand;
	import com.housediyadmin.command.roomCommand.EditRoomCommand;
	import com.housediyadmin.command.roomCommand.GetRoomCommand;
	import com.housediyadmin.command.roomCommand.UpdateRoomModelCmd;
	import com.housediyadmin.command.salesCommand.AddSalesCommand;
	import com.housediyadmin.command.salesCommand.DeleteSalesCommand;
	import com.housediyadmin.command.salesCommand.EditSalesCommand;
	import com.housediyadmin.command.salesCommand.GetSalesCommand;
	import com.housediyadmin.command.salesCommand.UpdateSalesCommand;
	import com.housediyadmin.command.sizeCommand.AddSizesCommand;
	import com.housediyadmin.command.sizeCommand.UpdateSizeCommand;
	import com.housediyadmin.command.treeCommand.AddAreaLevelCommand;
	import com.housediyadmin.command.treeCommand.AddGoodsLevelCommand;
	import com.housediyadmin.command.treeCommand.DeleteAreaLevelCommand;
	import com.housediyadmin.command.treeCommand.DeleteGoodsLevelCommand;
	import com.housediyadmin.command.treeCommand.EditAreaLevelCommand;
	import com.housediyadmin.command.treeCommand.EditGoodsLevelCommand;
	import com.housediyadmin.command.treeCommand.GetAreaTreeCommand;
	import com.housediyadmin.command.treeCommand.GetGoodsTreeCommand;
	import com.housediyadmin.command.treeCommand.UpdateAreaTreeCommand;
	import com.housediyadmin.command.treeCommand.UpdateGoodsTreeCommand;
	import com.housediyadmin.controller.LoadTypeXMLCommand;
	import com.housediyadmin.events.TypeXMLAdminEvent;
	import com.housediyadmin.events.brandEvents.AddBrandEvent;
	import com.housediyadmin.events.brandEvents.DeleteBrandByIDEvent;
	import com.housediyadmin.events.brandEvents.EditBrandEvent;
	import com.housediyadmin.events.brandEvents.GetBrandEvent;
	import com.housediyadmin.events.buildingEvents.AddBuildingEvent;
	import com.housediyadmin.events.buildingEvents.DeleteBuildingEvent;
	import com.housediyadmin.events.buildingEvents.EditBuildingEvent;
	import com.housediyadmin.events.buildingEvents.GetBuildingEvent;
	import com.housediyadmin.events.colorEvent.AddColorsEvent;
	import com.housediyadmin.events.fittingEvents.AddFittingEvent;
	import com.housediyadmin.events.fittingEvents.DeleteFittingByIDEvent;
	import com.housediyadmin.events.fittingEvents.EditFittingEvent;
	import com.housediyadmin.events.fittingEvents.GetFittingEvent;
	import com.housediyadmin.events.goodsEvents.AddGoodsEvent;
	import com.housediyadmin.events.goodsEvents.DeleteGoodsByIDsEvent;
	import com.housediyadmin.events.goodsEvents.EditGoodsEvent;
	import com.housediyadmin.events.goodsEvents.GetAllGoodsEvent;
	import com.housediyadmin.events.goodsEvents.GetGoodsByBrandIDEvent;
	import com.housediyadmin.events.goodsEvents.GetGoodsByDictFlagEvent;
	import com.housediyadmin.events.goodsEvents.GetGoodsByFittingIDEvent;
	import com.housediyadmin.events.goodsEvents.GetGoodsByNewsIDEvent;
	import com.housediyadmin.events.goodsEvents.GetGoodsBySalesIDEvent;
	import com.housediyadmin.events.goodsEvents.GetGoodsByTypeIDEvent;
	import com.housediyadmin.events.houseEvents.AddHouseEvent;
	import com.housediyadmin.events.houseEvents.DeleteHouseEvent;
	import com.housediyadmin.events.houseEvents.EditHouseEvent;
	import com.housediyadmin.events.houseEvents.GetHousesEvent;
	import com.housediyadmin.events.newsEvents.AddNewsEvent;
	import com.housediyadmin.events.newsEvents.DeleteNewsEvent;
	import com.housediyadmin.events.newsEvents.EditNewsEvent;
	import com.housediyadmin.events.newsEvents.GetNewsEvent;
	import com.housediyadmin.events.picModelEvent.AddPicturesEvent;
	import com.housediyadmin.events.roomEvents.AddRoomEvent;
	import com.housediyadmin.events.roomEvents.DeleteRoomEvent;
	import com.housediyadmin.events.roomEvents.EditRoomEvent;
	import com.housediyadmin.events.roomEvents.GetRoomEvent;
	import com.housediyadmin.events.salesEvents.AddSalesEvent;
	import com.housediyadmin.events.salesEvents.DeleteSalesEvent;
	import com.housediyadmin.events.salesEvents.EditSalesEvent;
	import com.housediyadmin.events.salesEvents.GetSalesEvent;
	import com.housediyadmin.events.sizeEvent.AddSizesEvent;
	import com.housediyadmin.events.treeEvents.AddAreaLevelEvent;
	import com.housediyadmin.events.treeEvents.AddBuildingLevelEvent;
	import com.housediyadmin.events.treeEvents.AddGoodsLevelEvent;
	import com.housediyadmin.events.treeEvents.DeleteAreaLevelEvent;
	import com.housediyadmin.events.treeEvents.DeleteGoodsLevelEvent;
	import com.housediyadmin.events.treeEvents.EditAreaLevelEvent;
	import com.housediyadmin.events.treeEvents.EditGoodsLevelEvent;
	import com.housediyadmin.events.treeEvents.GetAreaTreeEvent;
	import com.housediyadmin.events.treeEvents.GetGoodsTreeEvent;
	import com.housediyadmin.model.AreaTreeModel;
	import com.housediyadmin.model.BrandModel;
	import com.housediyadmin.model.BuildingModel;
	import com.housediyadmin.model.ColorModel;
	import com.housediyadmin.model.FittingModel;
	import com.housediyadmin.model.GoodsModel;
	import com.housediyadmin.model.GoodsTreeModel;
	import com.housediyadmin.model.HouseModel;
	import com.housediyadmin.model.ListTypeModel;
	import com.housediyadmin.model.NewsModel;
	import com.housediyadmin.model.PicModel;
	import com.housediyadmin.model.PictureModel;
	import com.housediyadmin.model.RoomModel;
	import com.housediyadmin.model.SalesModel;
	import com.housediyadmin.model.SizeModel;
	import com.housediyadmin.service.BrandRemoteObjectService;
	import com.housediyadmin.service.BuildingRemoteObjectService;
	import com.housediyadmin.service.ColorRemoteObjectService;
	import com.housediyadmin.service.FittingRemoteObjectService;
	import com.housediyadmin.service.GoodsRemoteObjectService;
	import com.housediyadmin.service.NewsRemoteObjectService;
	import com.housediyadmin.service.PictureRemoteObjectService;
	import com.housediyadmin.service.RoomRemoteObjectService;
	import com.housediyadmin.service.SalesRemoteObjectService;
	import com.housediyadmin.service.SizeRemoteObjectService;
	import com.housediyadmin.view.BuildingAdminMediator;
	import com.housediyadmin.view.BuildingAdminView;
	import com.housediyadmin.view.FittingAdminMediator;
	import com.housediyadmin.view.FittingAdminView;
	import com.housediyadmin.view.GoodsAdminMeditor;
	import com.housediyadmin.view.GoodsAdminView;
	import com.housediyadmin.view.GoodsTreeAdminMediator;
	import com.housediyadmin.view.GoodsTreeAdminView;
	import com.housediyadmin.view.NewsAdminMediator;
	import com.housediyadmin.view.NewsAdminView;
	import com.housediyadmin.view.RoomAdminMediator;
	import com.housediyadmin.view.RoomAdminView;
	import com.housediyadmin.view.SalesAdminMediator;
	import com.housediyadmin.view.SalesAdminView;
	import com.housediyadmin.view.TestViewMediator;
	import com.housediyadmin.view.components.BuildingPopUp;
	import com.housediyadmin.view.components.BuildingPopUpMediator;
	import com.housediyadmin.view.components.EditBrandMediator;
	import com.housediyadmin.view.components.EditBrandView;
	import com.housediyadmin.view.components.EditBuildingMediator;
	import com.housediyadmin.view.components.EditBuildingView;
	import com.housediyadmin.view.components.EditFittingMediator;
	import com.housediyadmin.view.components.EditFittingView;
	import com.housediyadmin.view.components.EditLabel;
	import com.housediyadmin.view.components.EditLabelMediator;
	import com.housediyadmin.view.components.EditTreeMediator;
	import com.housediyadmin.view.components.EditTreeView;
	import com.housediyadmin.view.components.FittingBrandComp;
	import com.housediyadmin.view.components.FittingBrandCompMediator;
	import com.housediyadmin.view.components.FittingComp;
	import com.housediyadmin.view.components.GoodsMediator;
	import com.housediyadmin.view.components.GoodsTypeAdminMediator;
	import com.housediyadmin.view.components.GoodsTypeAdminView;
	import com.housediyadmin.view.components.GoodsView;
	import com.housediyadmin.view.components.HousePopUp;
	import com.housediyadmin.view.components.HousePopUpMediator;
	import com.housediyadmin.view.components.NewsPopUp;
	import com.housediyadmin.view.components.NewsPopUpMediator;
	import com.housediyadmin.view.components.PicShowComp;
	import com.housediyadmin.view.components.PicShowCompMediator;
	import com.housediyadmin.view.components.PopUpGoodsType;
	import com.housediyadmin.view.components.PopUpGoodsTypeMediator;
	import com.housediyadmin.view.components.PopUploadView;
	import com.housediyadmin.view.components.Renterer.RendererTypeList;
	import com.housediyadmin.view.components.Renterer.RendererTypeListMediator;
	import com.housediyadmin.view.components.Renterer.SelectedNewsGoodsRenterer;
	import com.housediyadmin.view.components.Renterer.UploadRenderer;
	import com.housediyadmin.view.components.Renterer.UploadRendererMediator;
	import com.housediyadmin.view.components.RentererBuildingMediator;
	import com.housediyadmin.view.components.RentererBuildingView;
	import com.housediyadmin.view.components.RentererGoodsMediator;
	import com.housediyadmin.view.components.RentererGoodsPopupFittingView;
	import com.housediyadmin.view.components.RentererGoodsPopupGoodsFittingView;
	import com.housediyadmin.view.components.RentererGoodsView;
	import com.housediyadmin.view.components.RentererHouseMediator;
	import com.housediyadmin.view.components.RentererHouseView;
	import com.housediyadmin.view.components.RoomPopUp;
	import com.housediyadmin.view.components.RoomPopUpMediator;
	import com.housediyadmin.view.components.SalesPopUp;
	import com.housediyadmin.view.components.SalesPopUpMediator;
	import com.housediyadmin.view.components.TestView;
	import com.housediyadmin.view.components.TreeMediator;
	import com.housediyadmin.view.components.TreeView;
	import com.housediyadmin.view.components.TypeList;
	import com.housediyadmin.view.components.TypeListMediator;
	import com.housediyadmin.view.components.UploadPicComp;
	import com.housediyadmin.view.components.UploadPicCompMediator;
	import com.housediyadmin.view.titlewindow.AppendGoodsPicMediator;
	import com.housediyadmin.view.titlewindow.AppendGoodsPicView;
	import com.housediyadmin.view.titlewindow.EditGoodsMediator;
	import com.housediyadmin.view.titlewindow.EditGoodsView;
	import com.housediyadmin.view.titlewindow.FittingBrandEditMediator;
	import com.housediyadmin.view.titlewindow.FittingBrandEditView;
	import com.housediyadmin.view.titlewindow.SelectColorMediator;
	import com.housediyadmin.view.titlewindow.SelectColorView;
	import com.housediyadmin.view.titlewindow.SelectSizeMediator;
	import com.housediyadmin.view.titlewindow.SelectSizeView;
	import com.housediyadmin.view.titlewindow.UploadGoodsPicMediator;
	import com.housediyadmin.view.titlewindow.UploadGoodsPicView;
	
	import flash.display.DisplayObjectContainer;
	
	import org.robotlegs.mvcs.Context;
	
	/**
	 * 
	 * @author chenchao
	 * 
	 */
	public class HousediyContext extends Context
	{
		public function HousediyContext(contextView:DisplayObjectContainer=null, autoStartup:Boolean=true)
		{
			super(contextView, autoStartup);
		}
		
		override public function startup():void
		{
			//Service
			injector.mapSingleton(RoomRemoteObjectService);
			injector.mapSingleton(BuildingRemoteObjectService);
			injector.mapSingleton(GoodsRemoteObjectService);
			injector.mapSingleton(FittingRemoteObjectService);
			injector.mapSingleton(BrandRemoteObjectService);
			injector.mapSingleton(SalesRemoteObjectService);
			injector.mapSingleton(NewsRemoteObjectService);
			injector.mapSingleton(SizeRemoteObjectService);
			injector.mapSingleton(ColorRemoteObjectService);
			injector.mapSingleton(PictureRemoteObjectService);
			//Model
			injector.mapSingleton(GoodsTreeModel);
			injector.mapSingleton(GoodsModel);
			injector.mapSingleton(AreaTreeModel);
			injector.mapSingleton(BuildingModel);
            injector.mapSingleton(HouseModel);			
            injector.mapSingleton(RoomModel);
			injector.mapSingleton(GoodsTreeModel);
			injector.mapSingleton(BrandModel);
			injector.mapSingleton(FittingModel);
			injector.mapSingleton(NewsModel);
			injector.mapSingleton(SalesModel);
			injector.mapSingleton(ListTypeModel);
			injector.mapSingleton(SizeModel);
			injector.mapSingleton(ColorModel);
			injector.mapSingleton(PicModel);
			injector.mapSingleton(PictureModel);
//			injector.mapSingleton(UploadModel);
			/*mediatorMap.mapView(ControlButtons, ControlButtonsMediator);
			mediatorMap.mapView(GridContainer, GridContainerMediator);
			mediatorMap.mapView(MyVerticalScrollbar, MyVerticalScrollbarMediator);
			mediatorMap.mapView(MyVSlider, MyVSliderMediator);
			
			mediatorMap.mapView(DrawingBoard, DrawingBoardMediator);
			mediatorMap.mapView(RoomList, RoomListMediator);*/
			//View and Mediator
			mediatorMap.mapView(NewsAdminView, NewsAdminMediator);
			mediatorMap.mapView(GoodsView, GoodsMediator);
			mediatorMap.mapView(RentererGoodsView,RentererGoodsMediator);
			mediatorMap.mapView(GoodsAdminView, GoodsAdminMeditor);
			mediatorMap.mapView(GoodsTreeAdminView, GoodsTreeAdminMediator);
			mediatorMap.mapView(BuildingAdminView, BuildingAdminMediator);
			mediatorMap.mapView(RoomAdminView, RoomAdminMediator);
//			mediatorMap.mapView(BrandAdminView, BrandAdminMediator);
			mediatorMap.mapView(FittingAdminView, FittingAdminMediator);
			mediatorMap.mapView(SalesAdminView,SalesAdminMediator);
//			mediatorMap.mapView(HouseAdminView,HouseAdminMediator);
			mediatorMap.mapView(RentererHouseView,RentererHouseMediator);
			mediatorMap.mapView(FittingBrandComp, FittingBrandCompMediator);
			mediatorMap.mapView(EditTreeView, EditTreeMediator, null, false, false ); //disable auto mediation
			mediatorMap.mapView(EditFittingView, EditFittingMediator, null, false, false ); 
			mediatorMap.mapView(EditBrandView, EditBrandMediator, null, false, false ); 
			mediatorMap.mapView(EditGoodsView, EditGoodsMediator, null, false, false ); 
			mediatorMap.mapView(EditBuildingView,EditBuildingMediator,null,false,false);
			mediatorMap.mapView(FittingBrandEditView, FittingBrandEditMediator, null, false, false);
			mediatorMap.mapView(UploadGoodsPicView, UploadGoodsPicMediator, null, false, false);
			mediatorMap.mapView(SelectSizeView, SelectSizeMediator, null, false, false);
			mediatorMap.mapView(SelectColorView, SelectColorMediator, null, false, false);
			mediatorMap.mapView(AppendGoodsPicView, AppendGoodsPicMediator, null, false, false);
			mediatorMap.mapView(PicShowComp, PicShowCompMediator, null, false, false);
			//mediatorMap.mapView(EditHouseView,EditHouseMediator,null,false,false);
			mediatorMap.mapView(TreeView,TreeMediator);
			mediatorMap.mapView(RentererBuildingView,RentererBuildingMediator);
			mediatorMap.mapView(PopUpGoodsType,PopUpGoodsTypeMediator);
			mediatorMap.mapView(GoodsTypeAdminView,GoodsTypeAdminMediator);
			mediatorMap.mapView(TypeList,TypeListMediator);
			mediatorMap.mapView(EditLabel,EditLabelMediator);
			mediatorMap.mapView(RendererTypeList,RendererTypeListMediator);
			mediatorMap.mapView(UploadRenderer,UploadRendererMediator, null, false, false);
			//mediatorMap.mapView(PopUploadView, PopUploadViewMediator, null, false, false);
			//mediatorMap.mapView(RentererRoom, RentererRoomMediator);
			mediatorMap.mapView(UploadPicComp, UploadPicCompMediator, null, false, false);
			mediatorMap.mapView(NewsPopUp, NewsPopUpMediator, null, false, false ); 
			mediatorMap.mapView(SalesPopUp, SalesPopUpMediator, null, false, false ); 
			mediatorMap.mapView(HousePopUp, HousePopUpMediator);
			mediatorMap.mapView(RoomPopUp, RoomPopUpMediator);
//			mediatorMap.mapView(TestUploadView, TestUploadMediator);
			//commandMap.mapEvent(GridContainerEvent.GRID_SCALE_COMMAND, GridScaleCommand);
			
			//Event and Command
			commandMap.mapEvent(TypeXMLAdminEvent.LOAD_TYPE_XML, LoadTypeXMLCommand);
			//商品树相关的映射
			commandMap.mapEvent(GetGoodsTreeEvent.GET_GOODS_TREE, GetGoodsTreeCommand);
			commandMap.mapEvent(GetGoodsTreeEvent.UPDATE_GOODS_TREE, UpdateGoodsTreeCommand);
			commandMap.mapEvent(AddGoodsLevelEvent.ADD_GOODS_LEVEL, AddGoodsLevelCommand);
			commandMap.mapEvent(DeleteGoodsLevelEvent.DELETE_GOODS_LEVEL, DeleteGoodsLevelCommand);
			commandMap.mapEvent(EditGoodsLevelEvent.EDIT_GOODS_LEVEL, EditGoodsLevelCommand);
			//商品相关映射
			/*commandMap.mapEvent(GetGoodsByTypeIDEvent.GET_GOODS_BY_TYPEID, GetGoodsCommand);
			commandMap.mapEvent(GetGoodsByTypeIDEvent.UPDATE_GOODS_MODEL, UpdateGoodsCommand);*/
			commandMap.mapEvent(GetGoodsByBrandIDEvent.GET_GOODS_BY_BRANDID, GetGoodsByBrandIdCmd);
			commandMap.mapEvent(GetGoodsByBrandIDEvent.UPDATE_GOODS_BRAND, UpdateGoodsBrandCmd);
			commandMap.mapEvent(GetGoodsByFittingIDEvent.GET_GOODS_BY_FITTINGID, GetGoodsByFittingIDCmd);
			commandMap.mapEvent(GetGoodsByFittingIDEvent.UPDATE_GOODS_FITTING, UpdateGoodsFittingCmd);
			commandMap.mapEvent(GetGoodsByDictFlagEvent.GET_GOODS_BY_DICTFLAG, GetGoodsByDictFlagCmd);
    		commandMap.mapEvent(GetGoodsByDictFlagEvent.UPDATE_RELATEGOODS, UpdateRelateGoodsCmd);
			commandMap.mapEvent(GetGoodsByNewsIDEvent.GET_GOODS_BY_NEWSID, GetGoodsByNewsIDCmd);
			commandMap.mapEvent(GetGoodsByNewsIDEvent.UPDATE_GOODS_NEWS, UpdateGoodsNewsCmd);
			commandMap.mapEvent(GetGoodsBySalesIDEvent.GET_GOODS_BY_SALESID, GetGoodsBySalesIDCmd);
			commandMap.mapEvent(GetGoodsBySalesIDEvent.UPDATE_GOODS_SALES, UpdateGoodsSalesCmd);
			commandMap.mapEvent(AddGoodsEvent.ADD_GOODS, AddGoodsCommand);
			commandMap.mapEvent(EditGoodsEvent.EDIT_GOODS, EditGoodsCommand);
			commandMap.mapEvent(DeleteGoodsByIDsEvent.DELETE_GOODS_BY_IDS, DeleteGoodsByIDsCmd);
			
			//2.28 add9
			commandMap.mapEvent(GetAllGoodsEvent.GET_ALL_GOODS, GetAllGoodsCommand);
			commandMap.mapEvent(AddGoodsEvent.UPDATE, UpdateGoodsCommand);
			//区域树相关 的映射
			commandMap.mapEvent(GetAreaTreeEvent.GET_AREA_TREE, GetAreaTreeCommand);
			commandMap.mapEvent(GetAreaTreeEvent.UPDATE_AREA_TREE, UpdateAreaTreeCommand);
			commandMap.mapEvent(AddAreaLevelEvent.ADD_AREA_LEVEL, AddAreaLevelCommand);
			commandMap.mapEvent(EditAreaLevelEvent.EDIT_AREA_LEVEL, EditAreaLevelCommand);
			commandMap.mapEvent(DeleteAreaLevelEvent.DELETE_AREA_LEVEL, DeleteAreaLevelCommand);
			//
			commandMap.mapEvent(AddBuildingLevelEvent.ADD_BUILDING_LEVEL, AddBuildingLevelCommand);
			commandMap.mapEvent(GetBuildingEvent.UPDATE_BUILDING_IDS, UpdateBuildingIdsCommand);
			commandMap.mapEvent(GetBuildingEvent.UPDATE_BUILDING_MODEL, UpdateBuildingCommand);
			commandMap.mapEvent(GetBuildingEvent.GET_BUILDINGS_BY_IDS, GetBuildingCommand);
			commandMap.mapEvent(GetBuildingEvent.GET_BUILDING_IDS, GetBuildingIdsCommand);
			commandMap.mapEvent(AddBuildingEvent.ADD_BUILDING, AddBuildingCommand);
			commandMap.mapEvent(DeleteBuildingEvent.DELETE_BUILDING, DeleteBuildingCommand);
			commandMap.mapEvent(EditBuildingEvent.EDIT_BUILDING, EditBuildingCommand);
			
			//户型相关映射
			commandMap.mapEvent(AddHouseEvent.ADD_HOUSE, AddHouseCommand);
			commandMap.mapEvent(GetHousesEvent.UPDATE_HOUSE_MODEL, UpdateHouseModelCmd);
			commandMap.mapEvent(GetHousesEvent.GET_HOUSES_BY_IDS, GetHouseListCommand);
			commandMap.mapEvent(GetHousesEvent.GET_HOUSE_IDS, GetHouseIdsCmd);
			commandMap.mapEvent(GetHousesEvent.UPDATE_HOUSE_IDS, UpdateHouseIdsCmd);
			commandMap.mapEvent(EditHouseEvent.EDIT_HOUSE, EditHouseCommand);
			commandMap.mapEvent(DeleteHouseEvent.DELETE_HOUSES, DeleteHouseCommand);
			
			//room相关映射
			commandMap.mapEvent(AddRoomEvent.ADD_ROOM, AddRoomCommand);
			commandMap.mapEvent(DeleteRoomEvent.DELETE_ROOM, DeleteRoomCommand);
			commandMap.mapEvent(GetRoomEvent.GET_ROOM_MODEL, GetRoomCommand);
			commandMap.mapEvent(GetRoomEvent.UPDATE_ROOM_MODEL, UpdateRoomModelCmd);
			commandMap.mapEvent(EditRoomEvent.EDIT_ROOM, EditRoomCommand);
			
			//品牌相关映射
			commandMap.mapEvent(AddBrandEvent.ADD_BRAND, AddBrandCommand);
			commandMap.mapEvent(DeleteBrandByIDEvent.DELETE_BRAND_BY_ID, DeleteBrandByIDCommand);
			commandMap.mapEvent(GetBrandEvent.GET_BRANDS_MODEL, GetBrandCommand);
			commandMap.mapEvent(GetBrandEvent.GET_ALL_BRANDS, GetBrandCommand);
			commandMap.mapEvent(GetBrandEvent.UPDATE_BRANDS_MODEL, UpdateBrandCommand);
			commandMap.mapEvent(EditBrandEvent.EDIT_BRAND, EditBrandCommand);
			
			//配套产品相关映射
			commandMap.mapEvent(AddFittingEvent.ADD_FITTING, AddFittingCommand);
			commandMap.mapEvent(DeleteFittingByIDEvent.DELETE_FITTING_BY_ID, DeleteFittingByIDCmd);
			commandMap.mapEvent(GetFittingEvent.GET_ALL_FITTINGS, GetAllFittingsCommand);
			commandMap.mapEvent(GetFittingEvent.GET_FITTING_BY_GOODSID, GetFittingByGoodsIDCmd);
			commandMap.mapEvent(GetFittingEvent.UPDATE_FITTING_MODEL, UpdateFittingCommand);
			commandMap.mapEvent(GetFittingEvent.UPDATE_FITTING_GOODS, UpdateFittingGoodsCmd);
			commandMap.mapEvent(EditFittingEvent.EDIT_FITTING, EditFittingCommand);
			
			//新闻相关映射
			commandMap.mapEvent(GetNewsEvent.GET_ALL_NEWS, GetNewsCommand);
			commandMap.mapEvent(GetNewsEvent.UPDATE_NEWS_MODEL, UpdateNewsCommand);
			commandMap.mapEvent(DeleteNewsEvent.DELETE_NEWS, DeleteNewsCommand);
			commandMap.mapEvent(AddNewsEvent.ADD_NEWS, AddNewsCommand);
			commandMap.mapEvent(EditNewsEvent.EDIT_NEWS, EditNewsCommand);
			
			//促销相关映射
			commandMap.mapEvent(GetSalesEvent.GET_ALL_SALES, GetSalesCommand);
			commandMap.mapEvent(GetSalesEvent.UPDATE_SALES_MODEL, UpdateSalesCommand);
			commandMap.mapEvent(DeleteSalesEvent.DELETE_SALES, DeleteSalesCommand);
			commandMap.mapEvent(AddSalesEvent.ADD_SALES, AddSalesCommand);
			commandMap.mapEvent(EditSalesEvent.EDIT_SALES, EditSalesCommand);
			
			//颜色相关映射
			commandMap.mapEvent(AddColorsEvent.ADD_COLORS, AddColorsCommand);
			commandMap.mapEvent(AddColorsEvent.UPDATE_COLOR_MODEL, UpdateColorCommand);
			//尺寸相关映射
			commandMap.mapEvent(AddSizesEvent.ADD_SIZES, AddSizesCommand);
			commandMap.mapEvent(AddSizesEvent.UPDATE_SIZE_MODEL, UpdateSizeCommand);
			
			//图片相关映射
			commandMap.mapEvent(AddPicturesEvent.ADD_PICTURES, AddPicsCommand);
			commandMap.mapEvent(AddPicturesEvent.UPDATE_PICTURE_MODEL, UpdatePicCommand);
		}
	}
}